import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int year = sc.nextInt();
        int month = sc.nextInt();
        int day = sc.nextInt();
        int days = sc.nextInt();

        LocalDate date = LocalDate.of(year,month,day);
        LocalDate date1 = date.plusDays(days);
        DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
        System.out.println(date1.format(sdf));
        sc.close();
    }
}